<div class="page-3 cart commonPage">
	<div class="bg-3"></div>
	<?php echo $this->element('sidebar'); ?>
	<div class="box-right zhigh">
        <?php echo $this->element('banner'); ?>
			<div class="title">
                <ul class="breadcrumbs">
                    <li><a href="<?php echo $this->General->base_url() ?>"><img style="position: relative; top: 2px;" src="<?php echo $this->webroot ?>images/home-yl-2.png" /></a></li>
                    <?php
                        foreach($breadcrumbs as $breadcrumb)
                        {
                            echo '<li><a href="'.$this->General->base_url().$breadcrumb['link'].'">'.$breadcrumb['title'].'</a></li>';
                        }
                    ?>
                </ul>
			</div>
		<?php echo $this->element('header'); ?>
		<div class="box-content">
			<div class="post-content">

                <div class="form-contact" style="float: none; margin:20px auto">
                    <form id="contact_form" name="" method="post" action="">
                        <h4><?php $this->General->translate('send_email_for_friend') ?></h4>
                        <p>
                            <label><?php $this->General->translate('your_email') ?>:</label>
                            <input type="text" name="email_from" value="" />
                        </p>
                        <p>
                            <label><?php $this->General->translate('email_send_product') ?>:</label>
                            <input type="text" name="email_to" value="" />
                        </p>
                        <input type="hidden" name="link_product" value="<?php echo $link_product ?>" />
                        <!--
                        <p>
                            <label>Tiêu đề:</label>
                            <input type="text" name="subject" value="" />
                        </p>
                        <p>
                            <label>Nội dung:</label>
                            <textarea name="message" placeholder="Hãy chép link sản phẩm vào nội dung để gửi Email."></textarea>
                        </p>
                        <p>
                            <label>Link sản phẩm:</label>
                            <span><?php echo $link_product ?></span>
                        </p>
                        -->
                        <p>
                            <input type="submit" name="" value="<?php $this->General->translate('send') ?>" />
                            <span><?php echo $send_status ?></span>
                        </p>
                        
                    </form>
                </div>
            </div>
		</div>
	</div>
	<?php echo $this->element('footer'); ?>
</div>
<script>
    $(document).ready(function(){
        var validator = $("#contact_form").validate({ 
        rules: { 
            email_from: { 
                required: true, 
                email: true,
            },
            email_to: { 
                required: true, 
                email: true,
            }
        }, 
        messages: {
            email_from: { 
                required: "Hãy nhập 1 địa chỉ email hợp lệ", 
                email:"Địa chỉ email không hợp lệ",
                remote:"Email da co nguoi su dung"
            },
            email_to: { 
                required: "Hãy nhập 1 địa chỉ email hợp lệ", 
                email:"Địa chỉ email không hợp lệ",
                remote:"Email da co nguoi su dung"
            }
        },

    });

        
    });
</script>
